//
//  Enemy.m
//  FrameWork
//
//  Created by Eagle on 4/29/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "Enemy.h"


@implementation Enemy

@synthesize hp = _hp;
@synthesize range = _range;
@synthesize speed = _speed;
@synthesize slowdown = _slowdown;
@synthesize slowtime = _slowtime;
@synthesize isStop = _isStop;
@synthesize stopTime = _stopTime;

@synthesize direction = _direction;
@synthesize status = _status;
@synthesize row = _row;
@synthesize location = _location;
@synthesize nextLocation = _nextLocation;
@synthesize money = _money;
@synthesize exp = _exp;
@synthesize exploit = _exploit;
@synthesize typeName = _typeName;
@synthesize idStr = _idStr;
@synthesize rotBodyTime = _rotBodyTime;
@end

@implementation FootMan

+(id) enemy
{
	FootMan *enemy = nil;
 //   if ((enemy = [[[super alloc] initWithFile:@""] autorelease])) {
	if((enemy = [super node])){
		enemy.hp = [[Parameter sharedParameter] hpEnemy:1];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:1];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:1];
		enemy.exp = [[Parameter sharedParameter] expEnemy:1];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:1];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
    }
    return enemy;
}

-(void)changeOffPoint:(CGPoint)offPoint
{
	offsetPosition_ = offPoint;
	
}

@end

@implementation TengjiaMan

+(id) enemy
{
	TengjiaMan *enemy = nil;
    if((enemy = [super node])){
        enemy.hp = [[Parameter sharedParameter] hpEnemy:2];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:2];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:2];
		enemy.exp = [[Parameter sharedParameter] expEnemy:2];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:2];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
    }
    return enemy;
}



@end

@implementation Cavalry

+(id) enemy
{
	Cavalry *enemy = nil;
//    if ((enemy = [[[super alloc] initWithFile:@""] autorelease])) {
	if((enemy = [super node])){
        enemy.hp = [[Parameter sharedParameter] hpEnemy:3];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:3];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:3];
		enemy.exp = [[Parameter sharedParameter] expEnemy:3];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:3];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
		enemy.rotBodyTime = 0;
    }
    return enemy;
}



@end

@implementation ManAtArms

+(id) enemy
{
	ManAtArms *enemy = nil;
   if((enemy = [super node])){
        enemy.hp = [[Parameter sharedParameter] hpEnemy:4];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:4];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:4];
		enemy.exp = [[Parameter sharedParameter] expEnemy:4];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:4];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
    }
    return enemy;
}



@end

@implementation ElephantMan

+(id) enemy
{
	ElephantMan *enemy = nil;
    if((enemy = [super node])){
        enemy.hp = [[Parameter sharedParameter] hpEnemy:5];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:5];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:5];
		enemy.exp = [[Parameter sharedParameter] expEnemy:5];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:5];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
    }
    return enemy;
}



@end

@implementation Tank

+(id) enemy
{
	Tank *enemy = nil;
    if((enemy = [super node])){
        enemy.hp = [[Parameter sharedParameter] hpEnemy:6];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:6];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:6];
		enemy.exp = [[Parameter sharedParameter] expEnemy:6];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:6];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
    }
    return enemy;
}



@end

@implementation IronTank

+(id) enemy
{
	IronTank *enemy = nil;
    if((enemy = [super node])){
        enemy.hp = [[Parameter sharedParameter] hpEnemy:7];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:7];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:7];
		enemy.exp = [[Parameter sharedParameter] expEnemy:7];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:7];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
    }
    return enemy;
}



@end


@implementation MongHuo

+(id) enemy
{
	MongHuo *enemy = nil;
	if((enemy = [super node])){
		enemy.hp = [[Parameter sharedParameter] hpEnemy:8];
		enemy.money = [[Parameter sharedParameter] moneyEnemy:8];
		enemy.speed = [[Parameter sharedParameter] speedEnemy:8];
		enemy.exp = [[Parameter sharedParameter] expEnemy:8];
		enemy.exploit =  [[Parameter sharedParameter] exploitEnemy:8];
		enemy.range = 24;
		enemy.status = 0;
		enemy.slowdown = 0;
		enemy.slowtime = 0;
		enemy.isStop = NO;
		enemy.stopTime = 0;
	}
	return enemy;
}

@end


